<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../../../common/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<sfa:mainTitle></sfa:mainTitle>
		<%@ include file="../../../common/meta.jsp"%>
		<style type="text/css">
.AddPicLoading {
	background: url(${path}/images/loading2.gif) no-repeat;
	padding-left: 20px;
}

.uploadFileInput {
	position: absolute;
	left: 0;
	top: 0;
	width: 52px;
	height: 17px;
	filter: alpha(opacity =                          0);
	cursor: pointer;
	opacity: 0;
}
</style>
		<script type="text/javascript">
$(function() {
	debugger;
	var otherinfo = document.getElementById("otherinfo").innerHTML;
	var reg = /(http[s]?:\/\/([\w-]+.)+([:\d+])?(\/[\w-\.\/\?%&=]*)?)/gi;
	otherinfoArray = otherinfo.replace(reg, function($1) {
		return "<a href='" + $1.toLowerCase() + "' target='_blank'>"
				+ $1.toLowerCase() + "</a>";
	});

	document.getElementById("other").innerHTML = otherinfoArray;
});
</script>
	</head>
	<body id="master">
		<sfa:mainHeader></sfa:mainHeader>
		<div class="webpart3 contentarea">
			<div class="webpart-head">
				<div class="webpart-head-item">
					产品查询
				</div>
			</div>
			<div class="webpart-main">
				<div class="webpart-main-item" style="padding-top: 15px;">
					<div class="d_formitem">
						<table cellspacing="0" cellpadding="0" class="formitem">
							<tr>
								<td width="20%">
									<span>产品编码：</span>
								</td>
								<td valign="middle">
									${productInfo.productcode}
								</td>
							</tr>
							<tr>
								<td>
									<span>产品名称：</span>
								</td>
								<td>
									${productInfo.productname}
								</td>
							</tr>
							<tr>
								<td>
									<span>产品类型：</span>
								</td>
								<td>
									${productInfo.producttypename}
								</td>
							</tr>
							<tr>
								<td>
									<span>供应商：</span>
								</td>
								<td>
									${productInfo.providername}

								</td>
							</tr>
							<tr>
								<td>
									<span>销售状态：</span>
								</td>
								<td>
									${saleproduct.salestatus}
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<span>起售时间：</span>
								</td>
								<td>
									<fmt:formatDate value="${productInfo.salestartdate}"
										pattern="yyyy-MM-dd" />
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<span>止售时间：</span>
								</td>
								<td>
									<fmt:formatDate value="${productInfo.saleenddate}"
										pattern="yyyy-MM-dd" />
								</td>
							</tr>
							<tr>
								<td>
									<span>产品介绍：</span>
								</td>
								<td>
									<div id="otherinfo" class="otherinfo" style="display: none;">
										${saleproduct.otherinfo}
									</div>
									<div id="other" class="otherinfo"
										style="width: 200px; word-wrap: break-word;">

									</div>
								</td>
							</tr>
						</table>
					</div>

					<div align=" left" style="margin-top: 10px; margin-left: 4px;">
						<c:if test='${isPublished == true && saleproduct.isAffix=="Y"}'>
							<span class="webpart-head-item" style="font-weight: bold;">下载附件 </span>
							<hr />
						<table width="50%" border="0" cellspacing="0" cellpadding="10"
								class="form_table">

								<tr>
									<td>
										<span class="webpart-head-item" style="font-weight: bold;">产品条框</span>
									</td>
									<td>
										<c:forEach items="${affixList1}" var="affixList1">
											<a
												href="${path}/affix/index/download/${affixList1.SALEAFFIXITEMID}">${affixList1.SALEAFFIXITEMFILENAME}</a><br/>
										</c:forEach>
									</td>
								</tr>
								<tr>
									<td>
										<span class="webpart-head-item" style="font-weight: bold;">产品佣金率</span>
									</td>
									<td>
										<c:forEach items="${affixList2}" var="affixList2">
											<a
												href="${path}/affix/index/download/${affixList2.SALEAFFIXITEMID}">${affixList2.SALEAFFIXITEMFILENAME}</a><br/>
										</c:forEach>
									</td>
								</tr>
								<tr>
									<td>
										<span class="webpart-head-item" style="font-weight: bold;">产品费率</span>
									</td>
									<td>
										<c:forEach items="${affixList3}" var="affixList3">
											<a
												href="${path}/affix/index/download/${affixList3.SALEAFFIXITEMID}">${affixList3.SALEAFFIXITEMFILENAME}</a><br/>
										</c:forEach>
									</td>
								</tr>
								<tr>
									<td>
										<span class="webpart-head-item" style="font-weight: bold;">培训资料</span>
									</td>
									<td>
										<c:forEach items="${affixList4}" var="affixList4">
											<a
												href="${path}/affix/index/download/${affixList4.SALEAFFIXITEMID}">${affixList4.SALEAFFIXITEMFILENAME}</a><br/>
										</c:forEach>
									</td>
								</tr>
								<tr>
									<td>
										<span class="webpart-head-item" style="font-weight: bold;">彩页</span>
									</td>
									<td>
										<c:forEach items="${affixList5}" var="affixList5">
											<a
												href="${path}/affix/index/download/${affixList5.SALEAFFIXITEMID}">${affixList5.SALEAFFIXITEMFILENAME}</a><br/>
										</c:forEach>
									</td>
								</tr>
								<tr>
									<td>
										<span class="webpart-head-item" style="font-weight: bold;">产品宣传</span>
									</td>
									<td>
										<c:forEach items="${affixList6}" var="affixList6">
											<a
												href="${path}/affix/index/download/${affixList6.SALEAFFIXITEMID}">${affixList6.SALEAFFIXITEMFILENAME}</a><br/>
										</c:forEach>
									</td>
								</tr>
								<tr>
									<td>
										<span class="webpart-head-item" style="font-weight: bold;">获奖信息</span>
									</td>
									<td>
										<c:forEach items="${affixList7}" var="affixList7">
											<a
												href="${path}/affix/index/download/${affixList7.SALEAFFIXITEMID}">${affixList7.SALEAFFIXITEMFILENAME}</a><br/>
										</c:forEach>
									</td>
								</tr>
								<tr>
									<td>
										<span class="webpart-head-item" style="font-weight: bold;">视频信息</span>
									</td>
									<td>
										<c:forEach items="${affixList8}" var="affixList8">
											<a
												href="${path}/affix/index/download/${affixList8.SALEAFFIXITEMID}">${affixList8.SALEAFFIXITEMFILENAME}</a><br/>
										</c:forEach>
									</td>
								</tr>
							</table>
						</c:if>
						<hr />
						<a href="javascript:" onclick="history.go(-1);" class="linkbtn"><span>返回</span>
						</a>
					</div>
				</div>
				<div class="webpart-foot">
					<div class="webpart-foot-item">
					</div>
				</div>
			</div>
		</div>
		<sfa:mainFooter></sfa:mainFooter>
	</body>
</html>